package cj.web.admin.dao;
/*
 *  
 *  
*/
import java.util.List;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.ReturnGeneratedKeys;
import net.paoding.rose.jade.annotation.SQL;
import net.paoding.rose.jade.annotation.SQLParam;
import cj.web.admin.domain.NewsVersion;

/**
 * 
 * @author 
 *
 */
@DAO
public interface NewsVersionDAO{
	
    @SQL("select * from NewsVersion where id=:1")
    NewsVersion queryById(int id);
    
    @SQL("select * from NewsVersion where auditStepLogId=:1")
    NewsVersion queryByAuditStepLogId(int auditStepLogId);
    
    @SQL("select * from NewsVersion where newsId=:1")
    List<NewsVersion> queryByNewsId(int newsId);
    
    @ReturnGeneratedKeys
	@SQL("INSERT INTO NewsVersion (id,auditStepLogId,newsId,type,label,subjectId,columnsId,title,keywords,abstractInfor,vedioUrl,carouselImage,content,source,author,status,releaseState,releaseAt,isTop,isOuterLink,isComments,outerLinkUrl,stickAt,pvNum,pvNumFinal,praiseNum,commentsNum,forwardNum,collectNum,deleteFlag,createUser,createAt,updateUser,updateAt,version) VALUES (:t.id,:t.auditStepLogId,:t.newsId,:t.type,:t.label,:t.subjectId,:t.columnsId,:t.title,:t.keywords,:t.abstractInfor,:t.vedioUrl,:t.carouselImage,:t.content,:t.source,:t.author,:t.status,:t.releaseState,:t.releaseAt,:t.isTop,:t.isOuterLink,:t.isComments,:t.outerLinkUrl,:t.stickAt,:t.pvNum,:t.pvNumFinal,:t.praiseNum,:t.commentsNum,:t.forwardNum,:t.collectNum,:t.deleteFlag,:t.createUser,:t.createAt,:t.updateUser,:t.updateAt,:t.version)")
    public int create(@SQLParam("t") NewsVersion newsVersion);
}